package com.leantech.android.browser.utils

import androidx.core.view.children
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager2.widget.ViewPager2

fun ViewPager2.enableNestedScroll(enabled: Boolean) {
    children.find { it is RecyclerView }?.also { recyclerView ->
        recyclerView.isNestedScrollingEnabled = enabled
    }
}